<?php
/**
 *@author Connor <caokang@foxmail.com>
 *@todo
 *@link www.zeevin.com
 */
class SearchController extends CController{
	public $pageTitle='查找朋友_之嗅交友社区';
	public function actionIndex(){
		$tendency = Yii::app()->user->isGuest?(new UserSetting):UserSetting::model()->findByPk(Yii::app()->user->id);
		$users = User::getList($_GET['UserSetting']);
		if(Yii::app()->request->isAjaxRequest){
			$this->renderPartial('view',array('users'=>$users));
		}else
		
		$this->render('index',array('tendency'=>$tendency,'users'=>$users,'gets'=>$_GET['UserSetting']));
	}
}